package com.acsior.hibernate.vo;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.acsior.dac.impl.hibernate.vo.GeneratorKey;
import com.acsior.dac.impl.hibernate.vo.HibernatePersistantIntegerIdVO;

/**
 * ContragentContract entity. @author MyEclipse Persistence Tools <b><i>powered
 * by Belev</i></b>
 */
@Entity
@Table(name = "contragent_contracts")
@GeneratorKey(tableName = "contragent_contracts")
public class ContragentContractVO extends HibernatePersistantIntegerIdVO {

	private static final long serialVersionUID = 4801392628295775026L;

	@Temporal(TemporalType.DATE)
	@Column(name = "contraction_begin_date", nullable = false, length = 10)
	private Date contractionBeginDate;

	@Temporal(TemporalType.DATE)
	@Column(name = "contraction_date", nullable = false, length = 10)
	private Date contractionDate;

	@Temporal(TemporalType.DATE)
	@Column(name = "contraction_end_date", length = 10)
	private Date contractionEndDate;

	@Column(name = "contract_number", nullable = false, length = 100)
	private String contractNumber;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "contragent_id", nullable = false)
	private ContragentVO contragent;

	@Column(name = "subject")
	private String subject;

	/** default constructor */
	public ContragentContractVO() {
		super();
	}

	/**
	 * @return the contractionBeginDate
	 */
	public Date getContractionBeginDate() {
		return this.contractionBeginDate;
	}

	/** @return the contractionDate */
	public Date getContractionDate() {
		return this.contractionDate;
	}

	/**
	 * @return стойността на contractionEndDate
	 */
	public Date getContractionEndDate() {
		return this.contractionEndDate;
	}

	/** @return the contractNumber */
	public String getContractNumber() {
		return this.contractNumber;
	}

	/** @return the contragent */
	public ContragentVO getContragent() {
		return this.contragent;
	}

	/** @return the subject */
	public String getSubject() {
		return this.subject;
	}

	/**
	 * @param contractionBeginDate
	 *            the contractionBeginDate to set
	 */
	public void setContractionBeginDate(Date contractionBeginDate) {
		this.contractionBeginDate = contractionBeginDate;
	}

	/**
	 * @param contractionDate
	 *            the contractionDate to set
	 */
	public void setContractionDate(Date contractionDate) {
		this.contractionDate = contractionDate;
	}

	/**
	 * @param contractionEndDate
	 *            се залага в contractionEndDate
	 */
	public void setContractionEndDate(Date contractionEndDate) {
		this.contractionEndDate = contractionEndDate;
	}

	/**
	 * @param contractNumber
	 *            the contractNumber to set
	 */
	public void setContractNumber(String contractNumber) {
		this.contractNumber = contractNumber;
	}

	/**
	 * @param contragent
	 *            the contragent to set
	 */
	public void setContragent(ContragentVO contragent) {
		this.contragent = contragent;
	}

	/**
	 * @param subject
	 *            the subject to set
	 */
	public void setSubject(String subject) {
		this.subject = subject;
	}

}